
package com.audi.user.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "tbl_relation_apply")
public class RelationApply implements java.io.Serializable{
    
	private static final long serialVersionUID = 5454155825314635342L;
	
	
    /**
     * applyId       db_column: apply_id 
     */ 	
	
	private Long applyId;
    /**
     * userId       db_column: user_id 
     */ 	
	
	private Long userId;
    /**
     * status       db_column: status 
     */ 	
	
	private Long status;
    /**
     * createTime       db_column: create_time 
     */ 	
	
	private java.util.Date createTime;
    /**
     * destUserId       db_column: dest_user_id 
     */ 	
	
	private Long destUserId;
    /**
     * dealTime       db_column: deal_time 
     */ 	
	
	private java.util.Date dealTime;
    /**
     * demo       db_column: demo 
     */ 	
	//@Length(max=128)
	private java.lang.String demo;
	//columns END


	public RelationApply(){
	}

	public RelationApply(
		Long applyId
	){
		this.applyId = applyId;
	}

	

	public void setApplyId(Long value) {
		this.applyId = value;
	}
	
	@Id 
	//@SequenceGenerator(name="relation_apply_SEQ",sequenceName="seq_relation_apply")
    //@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="relation_apply_SEQ") 
	@GenericGenerator(name="custom-id", strategy = "identity")
    @GeneratedValue(generator="custom-id")
	@Column(name = "apply_id", unique = false, nullable = false, insertable = true, updatable = true, length = 22)
	public Long getApplyId() {
		return this.applyId;
	}
	
	@Column(name = "user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long value) {
		this.userId = value;
	}
	
	@Column(name = "status", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getStatus() {
		return this.status;
	}
	
	public void setStatus(Long value) {
		this.status = value;
	}
	
	
	
	@Column(name = "create_time", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	@Column(name = "dest_user_id", unique = false, nullable = true, insertable = true, updatable = true, length = 22)
	public Long getDestUserId() {
		return this.destUserId;
	}
	
	public void setDestUserId(Long value) {
		this.destUserId = value;
	}
	
	
	
	@Column(name = "deal_time", unique = false, nullable = true, insertable = true, updatable = true, length = 7)
	public java.util.Date getDealTime() {
		return this.dealTime;
	}
	
	public void setDealTime(java.util.Date value) {
		this.dealTime = value;
	}
	
	@Column(name = "demo", unique = false, nullable = true, insertable = true, updatable = true, length = 128)
	public java.lang.String getDemo() {
		return this.demo;
	}
	
	public void setDemo(java.lang.String value) {
		this.demo = value;
	}
	

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ApplyId",getApplyId())
			.append("UserId",getUserId())
			.append("Status",getStatus())
			.append("CreateTime",getCreateTime())
			.append("DestUserId",getDestUserId())
			.append("DealTime",getDealTime())
			.append("Demo",getDemo())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getApplyId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof RelationApply == false) return false;
		if(this == obj) return true;
		RelationApply other = (RelationApply)obj;
		return new EqualsBuilder()
			.append(getApplyId(),other.getApplyId())
			.isEquals();
	}
}

